/*
 * @Author: your name
 * @Date: 2022-04-11 00:48:27
 * @LastEditTime: 2022-04-11 18:55:25
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \vue-admin-template\src\api\comment.js
 */
import request from '@/utils/request'

// 分页获取
export function getAllArticles(data) {
  return request({
    url: '/comments/findAllComments',
    method: 'get',
    data,
  })
}
// 根据id删除
export function deleteCommentById(data) {
  return request({
    url: '/comment/deleteCommentById',
    method: 'delete',
    data
  })
}
/**
    * @summary 根据id审核评论
    * @description 根据id审核评论
    * @router post /comment/checkComment
    */
export function checkComment(data) {
  return request({
    url: '/comment/checkComment',
    method: 'post',
    data
  })
}
/**
   * @summary 根据id查询评论
   * @description 根据id查询评论
   * @router post /comment/findCommentById
   */
export function findCommentById(data) {
  return request({
    url: '/comment/findCommentById',
    method: 'post',
    data
  })
}
/**
    * @summary 添加评论
    * @description 添加评论
    * @router post /comment/createComment
    */
export function createComment(data) {
  return request({
    url: '/comment/createComment',
    method: 'post',
    data
  })
}